<body>
<h1>Listing <%= class_name.pluralize %></h1>

<table>
  <tr>
<% @attributes.each do |att| -%>
   <th><%= att.html_label %></th>
<% end -%>
   <th></th>
   <th></th>
   <th></th>
  </tr>

<#list <%= "#{model_parameter_name}List as #{model_parameter_name}" %>>
  <tr>
  <% @attributes.each do |att| -%>
    <td>
      <%= "${#{model_parameter_name}.#{att.name}!\"\"}" unless att.boolean? %>
      <%= "${#{model_parameter_name}.#{att.name}?string}" if att.boolean? %>
    </td>
  <% end -%>
    <td><a href="<%= "#{path}/${#{model_parameter_name}.id}" %>">show</a></td>
    <td><a href="<%= "#{path}/${#{model_parameter_name}.id}/edit" %>">edit</a></td>
    <td>
      <form action="<%= "#{path}/${#{model_parameter_name}.id}" %>" method="post">
    	  <input type="hidden" name="_method" value="delete"/>
    	  <button type="submit" onclick="return confirm('Are you sure?')">destroy</button>
	    </form>
	  </td>
    </tr>
</#list>
</table>

<br />
<a href="<%= path %>/new">New <%= class_name %></a> 
</body>
